#include <stdio.h>
#include <string.h>
#include "clientUtils.h"

void listClients(){
	for(int i=0;i<clientcount;++i){
		printf("%d/%s/%s/%s/%s/%s/%s/%s/%d\n",clientdata[i].id,clientdata[i].name,clientdata[i].surname,clientdata[i].address,clientdata[i].town,clientdata[i].province,clientdata[i].email,clientdata[i].password,clientdata[i].balance);
	}
}

int findClient(const int s){
	for(int i=0;i<clientcount;++i){
		if(clientdata[i].id==s){
			return i;
		}
	}
}

void swapclient(const struct ClientVars c,const unsigned int i){
	clientdata[i]=c;
}

void modName(const char *newname,const unsigned int i){
	strcpy(clientdata[i].name,newname);
}
